package cn.com.lms.business.learning.persistence.repository;

import cn.com.lms.business.learning.persistence.entity.FbLearningStage;
import com.bnzj.core.persistence.repository.BaseRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LearningStageRepository extends BaseRepository<FbLearningStage, Long> {


    @Modifying
    @Query(value = "delete from bnz_learning_stage  where plan_id=?1", nativeQuery = true)
    int delByPlanId(Long planId);

    @Query(value = "select * from bnz_learning_stage  where plan_id=?1", nativeQuery = true)
    List<FbLearningStage> queryStageByPlanId(Long palnId);
}
